package com.eudon.design_pattern.structural.bridge.after.notification;

import com.eudon.design_pattern.structural.bridge.after.sender.Sender;

/**
 * @author eudon
 * @description 服务级别错误通知
 * @date 2025/9/1
 * @email syd19970616@gmail.com
 * @address <a href="https://gitee.com/eudon">Gitee</a>
 */
public class ServerErrorNotify extends Notification {
    private final Sender sender;

    public ServerErrorNotify(Sender sender) {
        this.sender = sender;
    }

    @Override
    public boolean send() {
        try {
            sender.send();
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
        return true;
    }
}
